/*
 * MessageListItem.java
 * business
 *
 * Created by ChenTao on 2017/1/9.
 *
 * Copyright (c) 2017年 yidiandao. All rights reserved.
 */

package com.yidiandao.business.ui.widget.listview.displaylistitem;

import android.app.Activity;
import android.content.Context;
import android.view.View;

import com.yidiandao.business.R;
import com.yidiandao.business.ui.messageabout.system.SystemMessageActivity;
import com.yidiandao.business.ui.widget.listview.DisplayListItem;
import com.yidiandao.business.ui.widget.listview.viewholder.SystemMessageHolder;
import com.yidiandao.business.utils.UmengUtils;

/** 个人中心-消息-ListItem */
public class SystemMessageListItem extends DisplayListItem<SystemMessageHolder, Integer> {

    public SystemMessageListItem(int messageBean) {
        super(messageBean);
    }

    @Override
    public void onShow(final Context context, SystemMessageHolder holder) {
        holder.refreshUnReadCount(data);
        holder.rootLayout.setOnClickListener(
                new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        UmengUtils.onEvent(context, R.string.umeng_message_system);
                        SystemMessageActivity.actionStart((Activity) context);
                    }
                });
    }

    @Override
    public String getDisplayItemTag() {
        return SystemMessageListItem.class.getSimpleName();
    }

    @Override
    public Class<SystemMessageHolder> getViewHolderClazz() {
        return SystemMessageHolder.class;
    }
}
